#!/bin/bash
#default nginx port:81
if [ -d "${NGINX_PATH}" ]; then
NGINX_PORT=`grep -v "#"  /opt/fonsview/3RD/nginx/conf/conf.d/default.conf | grep listen |awk -F ";" '{print $1}' |awk '{print $2}'`
/usr/bin/curl -o /dev/null --retry 1 --max-time 3 -w %{http_code} -s "http://127.0.0.1:${NGINX_PORT}/index.html" | grep -c 200
fi
